<template>
    <div>
        <Upload
                multiple
                type="drag"
                action="http://127.0.0.1:81/organizeInfo/importExcelOrg" ref="orgUpload" :on-success="uploadOrgSuccess" :on-error="uploadOrgError">
            <div style="padding: 20px 0">
                <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
                <p> 导入组织机构</p>
            </div>
        </Upload>
    </div>
</template>

<script>
    export default {
        name: "ImportExcelOrg",
        data() {
            return {};
        },
        methods: {
            clearFilesOrg() {
                let self = this;
                self.$refs['orgUpload'].clearFiles();
            },
            uploadOrgSuccess(response,file){


            },
            uploadOrgError(file){
                let self= this;
                self.$Message.error({
                    content: "组织机构导入失败！",
                    duration: 5
                });
            }
        },
        mounted() {
            let self = this;
            self.clearFilesOrg();
        }
    }
</script>

<style scoped>

</style>